package leveldesigner.map;

import java.awt.Color;
import java.io.Serializable;

import leveldesigner.util.Matrix;

public class Layer implements Serializable{
	private static final long serialVersionUID = -3892032364502737826L;
	private Matrix<MapTile> matrix;
	private Color transparentColor;
	private String tileSetPath;
	
	public Layer (int width, int height){
		setMatrix(new Matrix<MapTile>(width, height));
		for (int x = 0; x < width; x++){
			for (int y = 0; y< height; y++){
				getMatrix().setElementAt(x, y, new MapTile(0));
			}
		}
	}

	public void setTransparentColor(Color transparentColor) {
		this.transparentColor = transparentColor;
	}
	public Color getTransparentColor() {
		return transparentColor;
	}
	public void setTileSetPath(String imagePath) {
		this.tileSetPath = imagePath;
	}
	public String getTileSetPath() {
		return tileSetPath;
	}

	public void setMatrix(Matrix<MapTile> matrix) {
		this.matrix = matrix;
	}

	public Matrix<MapTile> getMatrix() {
		return matrix;
	}
}
